home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / C / WLIB.ZIP / EXAMPLE3.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-26  |  454 b   |  21 lines

  1. #include <stdio.h>
  2. #include <WFile.h>
  3.  
  4. // this program will display a text file on the screen
  5.  
  6. int main(int argc, char* argv[])
  7.   {
  8.     if (argc==1) puts("usage:  example3 <filename.ext>\n\ntext files only!");
  9.     else if (argc==2)
  10.       {
  11.         if (FileExists(argv[1]))
  12.           {
  13.             TextFile F(argv[1]);
  14.             char Buffy[1000];
  15.             while(F.Read(Buffy)) puts(Buffy);
  16.           }
  17.       }
  18.     return 0;
  19.   }
  20.  
  21.